<template>
	<view>
		<h3 class="nav_title">{{userName}}的关注</h3>
		<view class="nav">
			<view @click="goBack" class="back"><i class="iconfont icon-fanhui"></i></view>
		</view>
		<view class="list">
			<tabulation-com :data="guanzhu"></tabulation-com>
		</view>
	</view>
</template>

<script>
	import {
		yycguanzhulist
	} from '../../api/index.js'
	// import "@/public/icon/iconfont.css";
	import TabulationCom from '../../components/TabulationCom/TabulationCom.vue'
	export default {
		data() {
			return {
				userName: '',
				guanzhu: []
			}
		},
		components: {
			TabulationCom
		},
		onLoad(options) {
			console.log(options.name)
			this.userName = options.name;
			this.getData()
		},
		methods: {
			goBack() {
				uni.navigateBack({
					delta: 1
				})
			},
			getData() {
				yycguanzhulist().then(res => {
					console.log(res);
					if (res.code == 200) {
						this.guanzhu = res.data
						console.log(this.guanzhu);
					}
				}).catch(err => {
					console.log(err);
				})
			}
		}
	}
</script>

<style scoped>
	.nav {
		width: 100%;
		height: 2.875rem;
		display: flex;
		justify-content: space-between;
		align-items: center;
		position: fixed;
		top: 0;
		background: #fff;
	}

	.iconfont {
		font-size: 22px;
		font-weight: bold;
		margin-left: 5px;
	}

	.nav_title {
		font-size: 20px;
		/* font-weight: bold; */
		width: 100%;
		/* height: 120px; */
		/* background-color: cadetblue; */
		z-index: 999;
		text-align: center;
	}

	.list {
		width: 100%;
		margin-top: 1.125rem;
	}
</style>